/**
 * All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
 * <p>
 * MpmProjectController
 * 项目立项
 * <p>
 * 修改纪录
 * 2020-12-25 版本：1.0 lanjianwei 创建。
 *
 * @version 版本：1.0
 * @author 作者：lanjianwei
 * 创建日期：2020-12-25
 */

package com.topscomm.gpm.controller;

import com.topscomm.basic.exception.MessageException;
import com.topscomm.pub.vo.ResponseResult;
import com.topscomm.gpm.service.impl.GpmProjectHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.*;

/**
 * @author: lanjianwei
 * @date: 2020-12-28
 * @description:项目立项聚合附加表Controller
 * @modify:
 */
@RestController
@RequestMapping("sd/projectpolymerization")
public class GpmProjectPolymerizationController {
    @Autowired
    private GpmProjectHistoryService gpmProjectHistoryService;

    /**
     * @description: 转发到/sd/projectHistory/updateLevelHistory
     * @param: paraMap
     * @return: com.topscomm.pub.vo.ResponseResult<java.lang.Object>
     * @author zhangjunyao
     * @date: 2022/2/18 9:52
     */
    @PostMapping(value = "/updateLevelHistory")
    public ResponseResult<Object> updateLevelHistory(@RequestBody(required = false) Map<String, Object> paraMap, HttpServletRequest request) {
        try {
            gpmProjectHistoryService.updateLevelHistory(paraMap);
            return ResponseResult.ok("成功");
        }catch (Exception e){
            throw new MessageException("修改‘项目级别变更历史’字段失败，请联系管理员");
        }
    }

}
